package com.facebank.usersupport.controller;

import com.facebank.usersupport.controller.base.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author NingKui
 * @date 2018/3/7 10:35
 **/
@Controller
public class PageController extends BaseController {
    @RequestMapping("/{pageName}")
    public String showBasePage(@PathVariable String pageName){
        return pageName;
    }

    /**
     * 访问相对应模块的页面，permision为一级文件夹名称
     * @param pageName
     * @return
     */

    @RequestMapping("/um/{pageName}")
    public String showUserPage(@PathVariable String pageName){
        return "/userManagerment/"+pageName;
    }

    @RequestMapping("/role/{pageName}")
    public String showRoleMenuPage(@PathVariable String pageName){
        return "/permissionManagerment/"+pageName;
    }

    @RequestMapping("/menu/{pageName}")
    public String showRoleMenuPage1(@PathVariable String pageName){
        return "/permissionManagerment/"+pageName;
    }

    @RequestMapping("/route/{pageName}")
    public String showRoutePage(@PathVariable String pageName){ return "/routeManagerment/"+pageName; }

    @RequestMapping("/activity/{pageName}")
    public String showActivityPage(@PathVariable String pageName){ return "/activityManagerment/"+pageName; }

    @RequestMapping("/mall/{pageName}")
    public String showMallPage(@PathVariable String pageName){ return "/mallManagerment/"+pageName; }

    @RequestMapping("/count/{pageName}")
    public String showCountPage(@PathVariable String pageName){ return "/countManagerment/"+pageName; }

    @RequestMapping("/sc/{pageName}")
    public String showSystemConfigPage(@PathVariable String pageName){
        return "/systemConfig/"+pageName;
    }

    @RequestMapping("/ul/{pageName}")
    public String showUserLoginPage(@PathVariable String pageName){
        return "/userLoginManagerment/"+pageName;
    }

    @RequestMapping("/associator/{pageName}")
    public String showAssociatorPage(@PathVariable String pageName){
        return "/associatorManagerment/"+pageName;
    }

    @RequestMapping("/agent/{pageName}")
    public String showAgentPage(@PathVariable String pageName){
        return "/agentSystem/"+pageName;
    }

    @RequestMapping("/spider/{pageName}")
    public String showSpiderPage(@PathVariable String pageName){
        return "/recommenderSystem/"+pageName;
    }
}
